<?php

namespace common\models\hospital;

use Yii;

/**
 * This is the model class for table "{{%hospital_log}}".
 *
 * @property int $id
 * @property string|null $hospital
 * @property string|null $content 记录脚本执行备注
 * @property string|null $function 记录执行的方法名
 * @property string|null $day
 * @property int|null $created_at
 * @property int|null $updated_at
 * @property int|null $status -1 = 错误, 1= 正常
 * @property int|null $count 记录ready.txt不见的次数,超过三次,异常报警
 */
class HospitalLog extends \common\models\BaseModel
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%hospital_log}}';
    }

    public static function primaryKey()
    {
        return ['id'];
    }

    public static function getDb()
    {
        return Yii::$app->db3;
    }
    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['created_at', 'updated_at', 'status', 'count'], 'integer'],
            [['hospital'], 'string', 'max' => 20],
            [['content', 'function', 'day'], 'string', 'max' => 255],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'hospital' => 'Hospital',
            'content' => 'Content',
            'function' => 'Function',
            'day' => 'Day',
            'created_at' => 'Created At',
            'updated_at' => 'Updated At',
            'status' => 'Status',
            'count' => 'Count',
        ];
    }
}
